$(document).ready(function(){
	access_token = $.getCookie("access_token");
	if($('.access_token').val() != "" && $('.access_token').val() != null){
		access_token = $('.access_token').val();
		if($.getCookie("access_token") == null){
			$.setCookie("access_token", access_token);
		}		
	}
    projekktor('#player_a', {
    poster: 'http://7xkkzi.com1.z0.glb.clouddn.com/city-partnership.png',
    title: 'this is projekktor',
    // playerFlashMP4: 'swf/StrobeMediaPlayback/StrobeMediaPlayback.swf',
    // playerFlashMP3: 'swf/StrobeMediaPlayback/StrobeMediaPlayback.swf',
    // width: 640,
    // height: 385,
    playlist: [
        {
        0: {src: "http://183.6.194.13/xdispatch/o8otyl9c8.bkt.clouddn.com/joinus-0527.mp4", type: "video/mp4"},
        }
    ]    
    }, function(player) {} // on ready 
    );	

    $('#player_a').height($('#player_a').width()*0.54)
    $('.video-font').css("top",$('#player_a').height()-50+"px");

	$('.put-in-button').click(function(){

		var cityName = $('.cityName').val();
		var name = $('.name').val();
		var phone = $('.phone').val();
		if(cityName == "" || name == "" || phone == ""){
			$.popTagShow(1,"请完整填写资料","",null,null,null,null,"确定",$.popTagHide);
			return false;
		}

		$.getJSON("/"+server+"/cityPartnershipAdd?access_token="+access_token+"&cityName="+cityName+"&name="+name+"&phone="+phone,function(json){
			if(json.result == 1){
				$.popTagShow(3,"申请成功","",null,null,null,null,"确定",$.popTagHide);		
				$('.cityName').val("");
				$('.name').val("");
				$('.phone').val("");
			}
			else{
				$.popTagShow(1,"申请失败","",null,null,null,null,"确定",$.popTagHide);		
			}
		})
	})



})